"use strict";

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.bulkInsert(
      "Goods",
      [
        {
          name: "橙光中心笔",
          price: 5,
          unit: "支",
          goodsInfo: "只有红色和黑色两种颜色，需要的请在申请时备注好颜色",
          timeBuying: new Date(),
          inputPerson: 20,
          inputTime: new Date(),
          inputNum: 30,
          stockNum: 10,
          totalInput: 200,
          type: 0,
          category: 1,
          critical: 10,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: "2B铅笔",
          price: 8,
          unit: "支",
          goodsInfo: "正宗的2B铅笔",
          timeBuying: new Date(),
          inputPerson: 21,
          inputTime: new Date(),
          inputNum: 300,
          stockNum: 100,
          totalInput: 500,
          type: 0,
          category: 0,
          critical: 20,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: "阳光小书桌",
          price: 6,
          unit: "张",
          goodsInfo: "可以用来办活动的桌子",
          timeBuying: new Date(),
          inputPerson: 20,
          inputTime: new Date(),
          inputNum: 50,
          stockNum: 40,
          totalInput: 100,
          type: 1,
          category: 0,
          critical: 30,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: "五颜六色小彩旗",
          price: 60,
          unit: "个",
          goodsInfo: "小彩旗的备注信息",
          timeBuying: new Date(),
          inputPerson: 20,
          inputTime: new Date(),
          inputNum: 50,
          stockNum: 45,
          totalInput: 1000,
          type: 0,
          category: 0,
          critical: 1,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
      ],
      {}
    );
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.bulkDelete("Goods", null, {});
  },
};
